let baseUrl="https://api.shop.eduwork.cn";
function request(params){
	uni.showLoading({
		title:"加载中"
	})
	return new Promise((resolve,reject)=>{
		uni.request({
			...params,
			url:baseUrl+params.url,
			success(res) {
				resolve(res)
			},
			fail(err) {
				reject(err)
				
			},
			complete() {
				uni.hideLoading()
				//加载完成的时候关闭loading
			}
			
		})
		
	})
}

export default request